package com.jmlee.controller;

import com.jmlee.pojo.CommonResult;
import com.jmlee.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description 分类服务接口
 * @Author jmLee
 * @Date 2021/3/8 8:30
 * @Version 1.0
 */
@RestController
public class CateController {

    @Autowired
    private CategoryService categoryService;

    @GetMapping("/allCates")
    public CommonResult category() {

        List allCatList = categoryService.getAllCatList();

        return CommonResult.success(allCatList, "ok");
    }

}
